import React from 'react';
import { View, Text,Dimensions } from 'react-native';
const screenWidth = Math.round(Dimensions.get('window').width);
const screenHeight = Math.round(Dimensions.get('window').height);
/*
1.在RN中，默认容器布局方式都是flex
2.方向 flex-direction:column;
3.在RN 中样式没有继承
4.单位
   1不用加px
   2不用加 vw vh
   3可以加百分比 "50%"
 */
const Index = () => <View
    style={{backgroundColor:"aqua",flexDirection:"row",
        width:"50%",height:"50%"
    }}>
  <Text style={{ color:"red",
    fontSize:50}}>JSX1</Text>
  <Text>JSX2</Text>
  <View style={{width:screenWidth/2,height:screenHeight/2,backgroundColor:"yellow"}}>
  <Text>屏幕宽度和高度的一半</Text>
  </View>
</View>

export default Index;
